﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace TPCN.DAL
{
  public  class ChiTietDonDatHangObj
    {
        private string _ChitietdondathangID;

        public string ChitietdondathangID
        {
            get { return _ChitietdondathangID; }
            set { _ChitietdondathangID = value; }
        }
        private string _DondathangID;

        public string DondathangID
        {
            get { return _DondathangID; }
            set { _DondathangID = value; }
        }
        private string _HangID;

        public string HangID
        {
            get { return _HangID; }
            set { _HangID = value; }
        }
        private string _Soluong;

        public string Soluong
        {
            get { return _Soluong; }
            set { _Soluong = value; }
        }
        private string _Ghichu;

        public string Ghichu
        {
            get { return _Ghichu; }
            set { _Ghichu = value; }
        }
        public ChiTietDonDatHangObj SetValuesFromDataReader(IDataReader reader)
        {
            ChiTietDonDatHangObj obj = new ChiTietDonDatHangObj();
            obj.ChitietdondathangID = (reader["ChitietdondathangID"] is DBNull) ? String.Empty : reader["ChitietdondathangID"].ToString();
            obj.DondathangID = (reader["DondathangID"] is DBNull) ? String.Empty : reader["DondathangID"].ToString();
            obj.HangID = (reader["HangID"] is DBNull) ? String.Empty : reader["HangID"].ToString();
            obj.Soluong = (reader["Soluong"] is DBNull) ? "0" : reader["Soluong"].ToString();
            obj.Ghichu = (reader["Ghichu"] is DBNull) ? String.Empty : reader["Ghichu"].ToString();
            return obj;
        }
    }
}
